#include<bits/stdc++.h>
using namespace std;
int main (){
	freopen("triangle.in" , "r" , stdin);
	freopen("triangle.out" , "w" , stdout);
	int n , a[21][21] = {0};
	cin >> n;
	for(int i = 1 ; i <= n ; i++){
		a[i][1] = 1;
		a[i][i] = 1;
	}
	cout << "     1" << endl;
	for(int i = 2 ; i <= n ; i++){
		int flag = 0;
		for(int j = 1 ; j <= n ; j++){
			if(a[i][j] == 1){
				if(flag == 0){
					flag = 1;
					cout << setw(6) << "1";
					continue;
				}
				else if(flag == 1){
					cout << setw(6) << "1";
					break;
				}
			}	
			
			a[i][j] = a[i - 1][j] + a[i - 1][j - 1];
			cout << setw(6) << a[i][j];				
		}
		cout << endl;
	}
	return 0;
}